#ifndef MAINITEM_H
#define MAINITEM_H

#include "include/undefinedItem.h"

class QLabel;

class MainItem : public Item, public QThread
{
public:
    QLabel *launch;
    MainItem(QWidget *parent = 0);
    inline void SetPos(const QString &position)
    {
        pos->setText(position);
    }

    inline void SetIcon(const QString &itemIcon)
    {
        icon->setText(itemIcon);
    }

    QLabel *icon;
protected slots:
    void SwitchToObject();

public slots:
    void run();
    void LaunchBlink();
    void FeedbackBlink();
    void MalfunctionBlink();

private:
    void CreateWidget();
    void CreateLayout();
    //void mousePressEvent(QMouseEvent *e);

    QLabel *pos;

    QLabel *feedback;
    QLabel *malfunction;
};

#endif // MAINITEM_H
